import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from "path"
import { changePackageVersion } from "./build/plugins"

export default defineConfig({
  base: "./",
  resolve: {
    alias: {
      "@": resolve(__dirname, "./src")
    }
  },
  plugins: [
    changePackageVersion(),
    vue({
      refTransform: [/src/]
    })
  ],
  css: {
    preprocessorOptions: {
      // less css预处理配置 less & less-loader
      less: {
        additionalData: '@import "./src/assets/css/default.less";'
      }
    }
  },
  server: {
    port: 9000
  }
})
